package by.parfen.game.service.impl;

import java.util.Date;
import java.util.List;

import by.parfen.game.datamodel.GamePlayer;
import by.parfen.game.datamodel.enums.GameState;
import by.parfen.game.datamodel.etc.GameSession;
import by.parfen.game.service.GameSessionService;

public class GameSessionServiceImpl implements GameSessionService {

	@Override
	public GameSession create(String name, GamePlayer gamePlayer) {
		GameSession gameSession = new GameSession(name);
		gameSession.setCreationDate(new Date());
		gameSession.setGameState(GameState.FINISH);
		gameSession.addGamePlayer(gamePlayer);
		return gameSession;
	}

	@Override
	public void delete(GameSession gameSession) {
		// TODO Auto-generated method stub

	}

	@Override
	public List<GamePlayer> getGamePlayers(GameSession gameSession) {
		return gameSession.getGamePlayers();
	}

}
